home *** CD-ROM | disk | FTP | other *** search
- Path: news.tu-chemnitz.de!fachat
- From: fachat@physik.tu-chemnitz.de (Andre Fachat)
- Newsgroups: comp.sys.cbm,comp.os.misc,alt.comp.hardware.homebuilt,comp.sys.apple2,comp.sys.apple2.programmer,comp.sys.atari.8bit
- Subject: Re: 6502 Multitasking OS announce
- Followup-To: comp.sys.cbm,comp.os.misc,alt.comp.hardware.homebuilt,comp.sys.apple2,comp.sys.apple2.programmer,comp.sys.atari.8bit
- Date: 20 Mar 1996 12:01:37 GMT
- Organization: University of Technology Chemnitz, FRG
- Message-ID: <4ios31$9b6@narses.hrz.tu-chemnitz.de>
- References: <4i94fs$stj@narses.hrz.tu-chemnitz.de> <holger.948.00030EE6@deep.hb.provi.de> <4ijtbe$7ca@no-names.nerdc.ufl.edu> <4ijuic$iiq@gatekeeper.liffe.com> <4ik00v$9r@fishlab7.fsh.mtu.edu> <4im8k0$gud@gatekeeper.liffe.com> <4iml11$s69@narses.hrz.tu-chemnitz.de> <4imo7b$36m@gatekeeper.liffe.com>
- NNTP-Posting-Host: dag.physik.tu-chemnitz.de
- X-Newsreader: TIN [version 1.2 PL2]
-
- Ralph Mason (ralph.mason@liffe.com) wrote:
- : You have sorta missed what I was meaning here. Sure you can map code
- : around here and there - but if many processes are going to use the
- : same routines the routienes better not use any global data. These
- : routine should use the stack for any working data. I guess you use no
- : absolute jumps :-)
-
- I do use absolute jumps. With an MMU, each task has its own kind of
- virtual machine. you can jump anywhere you want.
- Without MMU, only tasks that use different memory locations -
- in the zeropage, other RAM and program address space - can coexist.
-
-
- : what about a eor ?
-
- : you pass in the critial section as the adress and eor that adress with
- : say 1
-
- : if
-
- : wait:
- : cmp addr,0
- : beq get
- : call scheduler yeild function
- : jmp wait
- : get:
- : eor addr,1
- : jz wait
-
- : ..you should have the critical section here
-
- This version doesn't work. If the task gets interrupted between the
- cmp and the eor, another task can eor the address and enter the critical
- region. After the first task gets back, it eor's the address again,
- making it zero again and then having free entry to the critical region.
- Boom.
-
- But then, as many have pointed out, the 6502 has some test&set like
- operations, i.e. the 'shift' and the 'inc/dec' operations. One
- can surely build semaphores with them too.
-
- But in my OS, all possible blocks are done with the scheduler that
- puts the task to sleep instead of letting it spinlock, wasting CPU time.
- And interrupt routines should never block - so they can only call
- save - i.e. with SEI protected - routines.
-
- Andre
-
- --
- fachat@physik.tu-chemnitz.de | Andre Fachat, Phone: ++49-371-531-3551
- -----------------------------| Vettersstr. 72/622, 09126 Chemnitz, Germany
- Distribution via the |----------------------------------------------
- Microsoft Network prohibited!| Unix was invented prior to user-friendlyness!
-